<div class="post">
	<h4><a href="viewPost?postID=<?=$post->getPostID();?>"><?=$post->getTitle();?></a></h4>
	<div class="date">
		Posted on <?=$post->getDate()->toStr();?>
		<? if ($isLoggedIn) { ?>
		: <a href="editPost?postID=<?=$post->getPostID();?>">Edit Post</a>,
		<a href="editAlbum?postID=<?=$post->getPostID();?>">Edit Album</a>
		<? } ?>
	</div>
	<div class="clear">
		<? if ($photo = $post->getPreviewPhoto()) { ?>
		<div class="photo right">
			<div><img src="<?=$photo->getThumbPath();?>"/></div>
			<div class="center"><a href="viewAlbum?postID=<?=$post->getPostID();?>">View Album</a></div>
		</div>
		<? } ?>
		<div class="content"><?=$post->getContent();?></div>
	</div>

	<div>
		<span class="comments">
			Comments:
			<a href="viewPost?postID=<?=$post->getPostID();?>#comments">View (<?=$post->getCommentCount()?>)</a>
			<a href="viewPost?postID=<?=$post->getPostID();?>#commentForm">Write</a>
			|
		</span>
		<span class="labels">
			Labels:
			<?
			foreach ($labels as $label) {
				if (in_array($label->getLabelID(), $post->getLabelIDs())) {
			?>
			<a href="viewPosts?labelID=<?=$label->getLabelID();?>"><?=$label->getLabel();?></a>
			<?
				}
			}
			?>
		</span>
	</div>
</div>
